/**
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
*/
import request from '@/utils/request';

// 必备件管理
// 列表查询
export function getNecessaryItemsList(data){
  return request({
    url: `/isfd/modelManagementNecessaryItems/list`,
    method: 'post',
    data
  });
}

// 左侧树查询
export function getNecessaryItemsTree(params){
  return request({
    url: `/isfd/modelManagementNecessaryItems/listTree`,
    method: 'get',
    params
  });
}

// 保存必备件库信息
export function saveNecessaryItems(data){
  return request({
    url: `/isfd/modelManagementNecessaryItems/save`,
    method: 'post',
    data
  });
}

// 删除
export function deleteNecessaryItems(data){
  return request({
    url: `/isfd/modelManagementNecessaryItems/delete`,
    method: 'post',
    data
  });
}

// 删除前校验
export function deleteNecessaryItemsValidate(data){
  return request({
    url: `/isfd/modelManagementNecessaryItems/pre/delete`,
    method: 'post',
    data
  });
}

// 详情
export function getNecessaryItemsInfo(id){
  return request({
    url: `/isfd/modelManagementNecessaryItems/${id}`,
    method: 'get',
  });
}

// 边界条件
// 列表查询
export function getBoundaryOptionList(data){
  return request({
    url: `/isfd/modelManagementBoundary/list`,
    method: 'post',
    data
  });
}

// 保存边界条件
export function saveBoundaryOption(data){
  return request({
    url: `/isfd/modelManagementBoundary/save`,
    method: 'post',
    data
  });
}

// 删除
export function deleteBoundaryOption(data){
  return request({
    url: `/isfd/modelManagementBoundary/delete`,
    method: 'post',
    data
  });
}

// 删除前校验
export function deleteBoundaryOptionValidate(data){
  return request({
    url: `/isfd/modelManagementBoundary/pre/delete`,
    method: 'post',
    data
  });
}

// 详情
export function getBoundaryOptionInfo(id){
  return request({
    url: `/isfd/modelManagementBoundary/${id}`,
    method: 'get',
  });
}

// 载荷
// 列表查询
export function getLoadFileList(data){
  return request({
    url: `/isfd/modelManagementLoad/list`,
    method: 'post',
    data
  });
}

// 保存载荷信息
export function saveLoadFile(data){
  return request({
    url: `/isfd/modelManagementLoad/save`,
    method: 'post',
    data
  });
}

// 删除
export function deleteLoadFile(data){
  return request({
    url: `/isfd/modelManagementLoad/delete`,
    method: 'post',
    data
  });
}

// 删除前校验
export function deleteLoadFileValidate(data){
  return request({
    url: `/isfd/modelManagementLoad/pre/delete`,
    method: 'post',
    data
  });
}

// 详情
export function getLoadFileInfo(id){
  return request({
    url: `/isfd/modelManagementLoad/${id}`,
    method: 'get',
  });
}

// 文件下载
export function getElementLibraryFile(data){
  return request({
    url: `/resource/oss/server/download`,
    method: 'post',
    data
  });
}